{if (isset($content.userlevel) && $smarty.session.CMS.user_level >= $content.userlevel) OR !isset($content.userlevel)}
	<div class="divFormFieldLabel">{$content.label|htmlentitiesutf8}</div>
	<div class="divFormField">
		<input type="hidden" name="{$prefix}[{$content.fieldname}]{$suffix}[file]" id="file_{$content.fieldname}_{$obj.obj_id}" value="{$content.image.picture_filename}"/>
		<input type="hidden" name="{$prefix}[{$content.fieldname}]{$suffix}[dir]" id="dir_{$content.fieldname}_{$obj.obj_id}" value="{$content.image.picture_dir}"/>
		
		<div id="{$content.fieldname}_{$obj.obj_id}_container" {if !is_array($content.image)}style="display:none;"{/if}>	
			<h4 class="line">{$smarty.config.Forms_image_selected}</h4>
			{if ($content.image.picture_filename !="") }
				{return_resize_img src="`$MEDIA_WEB``$content.image.picture_dir``$content.image.picture_filename`" id="mypic" width="125" height="125" alt="`$filedetails.filename`" stretch="0" style="border:1px solid #ccc;"}<br />
				{assign var="img_src" value=$img_mypic.src}
			{else}
				{assign var="img_src" value="`$CMS_WEB_DIR`img/image-missing.gif"}
			{/if}
			<div id="preview_{$content.fieldname}_{$obj.obj_id}" style="float:left;width:160px;text-align:right;">	
				<div id="img_{$content.fieldname}_{$obj.obj_id}" style="width:140px;height:140px;background:url({$img_src}) center center no-repeat #eeeeee;border:1px solid #dcdcdc;"></div>
			</div>
			<div style="float:left;">
				{$smarty.config.Forms_image_description}:<br />
				<input type="text" name="{$prefix}[{$content.fieldname}]{$suffix}[description]" id="description_{$content.fieldname}_{$obj.obj_id}" class="FormFieldInput" value="{$content.image.picture_description|htmlentitiesutf8}" style="width:325px;" /><br />
			
				<div style="float:left;width:60px;">{$smarty.config.Forms_image_filemame}:</div>
				<div style="float:left;"><span id="{$content.fieldname}_{$obj.obj_id}_label">{$content.image.picture_filename}</span></div>
				<div class="clear"></div>
				<div style="float:left;width:60px;">{$smarty.config.Forms_image_type}:</div>
				<div style="float:left;" id="{$content.fieldname}_{$obj.obj_id}_type">{$content.image.end}</div>
				<div class="clear"></div>
				<div style="float:left;width:60px;">{$smarty.config.Forms_image_size}:</div>
				<div style="float:left;" id="{$content.fieldname}_{$obj.obj_id}_size">{$content.image.width}x{$content.image.height}, {$content.image.file_size}</div>
				<div class="clear"></div>
				<div style="float:left;width:60px;">{$smarty.config.Forms_image_original}:</div>
				<div style="float:left;"><a id="{$content.fieldname}_{$obj.obj_id}_anchor" href="{$MEDIA_WEB}{$content.image.picture_dir}{$content.image.picture_filename}" target="_blank">&raquo; {$smarty.config.Forms_image_show}</a></div>
				<div class="clear"></div>
				<input type="button" value="{$smarty.config.Forms_image_remove_image}" style="width:160px;" onclick="CMS.reset_image('{$content.fieldname}_{$obj.obj_id}');" /><br />
			</div>
			<div class="clear"></div>
		</div>
	
		<h4 class="line">
			<span style="float:left;" onclick="CMS.open_upload('{$content.fieldname}_{$obj.obj_id}')">{$smarty.config.Forms_image_select_new}</span>
			<span style="float:right">
				<a href="javascript:void(0);" onclick="CMS.open_upload('{$content.fieldname}_{$obj.obj_id}')">{strip}
					{if is_array($content.image)}
					<img src="img/icon-formtype-open.gif" style="padding:0;margin:0;" id="{$content.fieldname}_{$obj.obj_id}_upload_switch" vspace="0" hspace="0" border="0" alt="" />
					{else}
					<img src="img/icon-formtype-close.gif" style="padding:0;margin:0;" id="{$content.fieldname}_{$obj.obj_id}_upload_switch" vspace="0" hspace="0" border="0" alt="" />
					{/if}
				{/strip}</a>
			</span>
			<div class="clear" style="margin:0;"></div>
		</h4>
	
		<div id="{$content.fieldname}_{$obj.obj_id}_upload" style="{if is_array($content.image)}display:none;{/if}">
			<br />
			{if ($smarty.session.CMS.user_level >= 1000) OR ($smarty.session.CMS.user_flags.general_filemanager)}
	
				<div style="float:left;width:140px;color:#333;font-size:12px;">{$smarty.config.Forms_image_upload_a}:</div>
				<div style="float:left;"><input type="button" value="{$smarty.config.Forms_image_select_image}" onclick="{strip}{literal}
			
								CMS.FileManager.open({
									{/literal}
									root:'media',
									project_id:'{$project_id}',
									multiple:false,
									{literal}
									post_params:{
									{/literal}
										type:'image',
										open_dir:xajax.$('dir_{$content.fieldname}_{$obj.obj_id}').value
									{literal}
									},
									callback:{
										ccdsfun:'FileManagerReturnImage',
										ccdsclass:'ccdsFileManager'
									},
									returnfield:{
									{/literal}
										file : xajax.$('file_{$content.fieldname}_{$obj.obj_id}'),
										dir : xajax.$('dir_{$content.fieldname}_{$obj.obj_id}'),
										label : xajax.$('{$content.fieldname}_{$obj.obj_id}_label'),
										size : xajax.$('{$content.fieldname}_{$obj.obj_id}_size'),
										type : xajax.$('{$content.fieldname}_{$obj.obj_id}_type'),
										preview : xajax.$('preview_{$content.fieldname}_{$obj.obj_id}'),
										anchor: xajax.$('{$content.fieldname}_{$obj.obj_id}_anchor'),
										description : xajax.$('description_{$content.fieldname}_{$obj.obj_id}'),
										img : xajax.$('img_{$content.fieldname}_{$obj.obj_id}'),
										container:xajax.$('{$content.fieldname}_{$obj.obj_id}_container')
									{literal}
									}
								});
							{/literal}{/strip}" /></div>
			{/if}
			
		{if !empty($content.default_path) || !empty($smarty.session.CMS.user_dir)}
			
			{if !empty($smarty.session.CMS.user_dir) AND !$smarty.session.CMS.user_flags.general_filemanager}
			
				{assign var="upload_dir" value=$smarty.session.CMS.user_dir}
				{assign var="rootdir" value="user"}
			{else}
				{assign var="upload_dir" value=$content.default_path}
				{assign var="rootdir" value="media"}
			{/if}
			{if ($smarty.session.CMS.user_level >= 1000) OR ($smarty.session.CMS.user_flags.general_filemanager)}
				<div class="clear" style="border-bottom:1px solid #d7d7d7;padding-top:10px;margin-bottom:10px;"></div>	
			{/if}
				<div class="clear" style="border-bottom:1px solid #d7d7d7;padding-top:10px;margin-bottom:10px;"></div>	
				<div style="float:left;width:140px;color:#333;font-size:12px;">{$smarty.config.Forms_image_upload_b}:</div>
				<div class="clear"></div>	
				<div>
					<div style="float:left;width:125px;margin-left:15px;">
						<h5>{$smarty.config.Forms_image_dest_folder}:</h5>
					</div>
					<div style="float:left;">
						{$smarty.config.Forms_image_upload_dir1}:<br />
						&quot;<span id="{$content.fieldname}_{$obj.obj_id}_path_label">{$upload_dir}&quot;</span><br />
						{if $smarty.session.CMS.user_flags.general_filemanager}(<a href="javascript:void(0);" onclick="{strip}
						{literal}xajax.request({
										ccdsfun:'FileManagerDirSelectorOpen',
										ccdsclass:'ccdsFileManager'	
						},
						{
							parameters:
								[
									{{/literal}
										root:'media',
										dir:'/',
										project_id:'{$project_id}',
										field:'{$content.fieldname}_{$obj.obj_id}_path'
									{literal}}
								]
							}
							);
						{/literal}{/strip}">{$smarty.config.Forms_image_change_dir}</a>){/if}<br />
					</div>
					<div class="clear"></div>	
			
					<div style="float:left;width:125px;margin-left:15px;">
						<h5>Dateiauswahl:</h5>
					</div>
					<div style="float:left;">
						<div>
							<input type="hidden" name="path" id="{$content.fieldname}_{$obj.obj_id}_path" value="{$upload_dir}" />
							<input type="input" type="file" name="{$prefix}[{$content.fieldname}]{$suffix}[up]" id="up_{$obj.obj_id}_{$content.fieldname}" size="50" />
						</div>
			
						<input type="button" class="submitbtn" value="{$smarty.config.Forms_image_upload}" style="width:160px;" onclick="{xajax_request 
						ccdsfun= "ContentEditorImageUpload"
						ccdsclass = "ccdsContentEditor"
						param_obj_id = "`$obj.obj_id`" 
						param_obj_vers_id = "xajax.$('obj_vers_id_`$obj.obj_id`').value"
						param_filefield = "'up_`$obj.obj_id`_`$content.fieldname`'"
						param_fieldname = "'`$content.fieldname`'"
						param_path ="xajax.$('`$content.fieldname`_`$obj.obj_id`_path').value"
						param_root = "'$rootdir'"
						param_project_id="'`$project_id`'" 
						mode= "'SWFupload'"
						context_label = "xajax.$('`$content.fieldname`_`$obj.obj_id`_label')"
						context_file = "xajax.$('file_`$content.fieldname`_`$obj.obj_id`')"
						context_dir = "xajax.$('dir_`$content.fieldname`_`$obj.obj_id`')"
						context_size = "xajax.$('`$content.fieldname`_`$obj.obj_id`_size')"
		
						context_type = "xajax.$('`$content.fieldname`_`$obj.obj_id`_type')"
						context_preview = "xajax.$('preview_`$content.fieldname`_`$obj.obj_id`')"
						context_anchor = "xajax.$('`$content.fieldname`_`$obj.obj_id`_anchor')"
						context_description = "xajax.$('description_`$content.fieldname`_`$obj.obj_id`')"
						context_img = "xajax.$('img_`$content.fieldname`_`$obj.obj_id`')"
						context_container = "xajax.$('`$content.fieldname`_`$obj.obj_id`_container')"
						SWFfield = "'up_`$obj.obj_id`_`$content.fieldname`'"
						}" />
					</div>
					<div class="clear"></div>	
				</div>
			{/if}
		</div>		
	</div>
	<div class="clear"></div>
{else}
	<input type="hidden" name="{$prefix}[{$content.fieldname}]{$suffix}[file]" id="file_{$content.fieldname}_{$obj.obj_id}" value="{$content.image.picture_filename}"/>
	<input type="hidden" name="{$prefix}[{$content.fieldname}]{$suffix}[dir]" id="dir_{$content.fieldname}_{$obj.obj_id}" value="{$content.image.picture_dir}"/>
	<input type="hidden" name="{$prefix}[{$content.fieldname}]{$suffix}[description]" id="description_{$content.fieldname}_{$obj.obj_id}" class="FormFieldInput" value="{$content.image.picture_description|htmlentitiesutf8}" />
	<input type="hidden" name="path" id="{$content.fieldname}_{$obj.obj_id}_path" value="{$content.default_path}" />
{/if}